//
//  FutureCollectionViewCell.m
//  天气预报
//
//  Created by mac on 16/1/21.
//  Copyright © 2016年 YF_S. All rights reserved.
//

#import "FutureCollectionViewCell.h"

@implementation FutureCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithFrame:(CGRect)frame{

    if ([super initWithFrame:frame]) {
        
        self = [[[NSBundle mainBundle] loadNibNamed:@"FutureCollectionViewCell" owner:nil options:nil] objectAtIndex:0];
    }
    
    return self;
}


-(void)setModel:(FutureWeatherModel *)model{

    _model = model;
    
    _date.text = _model.date;
    
    _week.text = [NSString stringWithFormat:@"星期%@",_model.week];
    
    _nongli.text = _model.nongli;
    
    NSArray *night = [_model.info objectForKey:@"night"];
    
    _night_direct.text = [NSString stringWithFormat:@"风向:%@",night[3]];
    
    _night_power.text = [NSString stringWithFormat:@"风级:%@",night[4]];
    
    _night_temperature.text = [NSString stringWithFormat:@"%@’/%@’",night[0],night[2]];
    
    _night_weather.text = night[1];
    
    _nightDownTime.text = [NSString stringWithFormat:@"日落:%@",night[5]];
    
    //白天
    NSArray *day = [_model.info objectForKey:@"day"];
    
    _direct.text = [NSString stringWithFormat:@"风向:%@",day[3]];
    
    _power.text = [NSString stringWithFormat:@"风级:%@",day[4]];
    
    _temperature.text = [NSString stringWithFormat:@"%@’/%@’",day[0],day[2]];
    
    _weather.text = day[1];
    
    _dayUpTime.text = [NSString stringWithFormat:@"日出:%@",day[5]];

}


@end
